FreescaleBEMF
 
Component FreescaleBEMF
Back ElectroMagnetic Force
Component Level: Low
Typical Usage:
(Examples of a typical usage of the component in user code. For more information please see the page Component Code Typical Usage.)

Assume the component name "BEMF1". There is the following typical usage:
  MAIN.C

void main(void)
{
  byte cnt = 0;
  
  :
  
  BEMF1_Reset();             /* Clear old BEMF counter value. */
  while(!BEMF1_Active()) {}  /* Wait until activate counter.  */
                             /* Counter is running,           */
  while( BEMF1_Active()) {}  /* wait until deactivate.        */
  cnt = BEMF1_GetValue();    /* Now read measured value.      */
  
  :
  
}